package com.fly.user.client;

import com.fly.common.model.OrderEntity;
import com.fly.common.vo.ResponseVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @description 订单服务调用接口
 * @author: liying.fu
 * @Date: 2018/11/24 下午5:20
 */
@Component
@FeignClient(value = "order-server", fallback = OrderClientFallback.class)
public interface OrderClient {

    /**
     * 获取个人订单
     * @param userId 下单人主键
     * @return 我的订单
     */
    @GetMapping(path = "/order/queryOrderByUserId/{userId}")
    ResponseVO<List<OrderEntity>> queryOrderByUserId(@PathVariable("userId") Long userId);
}
